<div class="menuBlock">
 <table class="fullW fullH">
  <tr>
   <td class="menuBlockItem promotions">
    <div class="linkItem">
     <a class="block-link" href="<?php echo '/forum/forumdisplay.php?fid='.$this->config->forum->promo; ?>" title="Zobacz oferty promocje ProfitMania">
      Promocje
     </a>
    </div>
    <div class="contextSearchItem">
     <form name="promotionsForm" action="javascript: search(1, '<?php echo $this->baseUrl.'/Search/pquery/'; ?>');" method="get">
      <table class="fullW fullH">
       <tr>
        <td class="context-search-input">
      	 <?php echo $this->formText('key', '', array('class' => 'form-text', 'tabindex' => '1')) ?>
      	</td>
      	<td>
      	 &nbsp;
      	</td>
      	<td class="context-search-image">
      	 <?php echo $this->formImage('psubmit', 'Szukaj', array('tabindex' => '2', 'src'=>$this->baseUrl.'/public/images/search-button-green.jpg')); ?>
      	</td>
       </tr>
      </table>
     </form>
    </div>
   </td>
   <td>
    &nbsp;
   </td>
   <td class="menuBlockItem coupons">
    <div class="linkItem">
	 <a class="block-link" href="<?php echo $this->baseUrl.'/Coupons'; ?>" title="Zobacz kupony rabatowe ProfitMania">      
	  Kupony
     </a>
    </div>    
    <div class="contextSearchItem">
     <form name="couponsForm" action="javascript: search(2, '<?php echo $this->baseUrl.'/Search/cquery/'; ?>');" method="get">
      <table class="fullW fullH">
       <tr>
        <td class="context-search-input">
      	 <?php echo $this->formText('key', '', array('class' => 'form-text', 'tabindex' => '3')) ?>
      	</td>
      	<td>
      	 &nbsp;
      	</td>
      	<td class="context-search-image">
		 <?php echo $this->formImage('csubmit', 'Szukaj', array('tabindex' => '4', 'src'=>$this->baseUrl.'/public/images/search-button-orange.jpg', 'width'=>'84', 'height'=>'24')); ?>      	</td>
       </tr>
      </table>     
     </form>
    </div>
   </td>
   <td>
    &nbsp;
   </td>
   <td class="menuBlockItem forums">
    <div class="linkItem">
     <a class="block-link" href="<?php echo '/forum/forumdisplay.php?fid='.$this->config->forum->forum; ?>" title="Wejdź na forum ProfitMania">
      Forum
     </a>
    </div>
    <div class="contextSearchItem forumEntry">
	 <a href="/forum/forumdisplay.php?fid=9" title="Forum">
	  <img src="<?php echo $this->baseUrl.'/public/images/entry-forum-button.jpg'?>" alt="Wejście do forum ProfitMania" />
	 </a>
    </div>
   </td>
  </tr>
 </table>
</div>
<div class="textBlock">
 <table class="fullW fullH">
  <tr>
   <td class="textBlockItem">
    <table class="fullW">
     <tr>
      <td class="hot-promo-header">
	   <table class="fullW">
	    <tr>
	     <td class="hot-promo-header-icon">
	      <a class="submenu-link" href="<?php echo '/forum/forumdisplay.php?fid='.$this->config->forum->promo1; ?>" title="Gorące Promocje">
	       <img src="<?php echo $this->baseUrl.'/public/images/arrow_g2o.png'?>" alt="Gorące Promocje" width="31px" height="24px" />
	      </a>
	     </td>
	     <td class="hot-promo-header-text">
	      <a class="submenu-link" href="<?php echo '/forum/forumdisplay.php?fid='.$this->config->forum->promo1; ?>" title="Gorące Promocje">
	       <h1 class="promo-header">Gorące Promocje</h1>
	      </a>
	     </td>
	    </tr>
	   </table>       
      </td>
     </tr>
<?php 
	if (count($this->hot_promotions) == 0) :
?>
	 <tr>
	  <td class="data-cell-light">
	   Brak promocji
	  </td>
	 </tr>	
<?php 
	else :
		$loopCounter = 0;
		foreach ($this->hot_promotions as $hkey=>$hvalue) : ?>
	 <tr>
	  <td class="<?php echo ($loopCounter%2 == 0 ? 'data-cell-light' : 'data-cell-dark'); ?>">
	   <table class="fullW">
	    <tr>
	     <td class="data-title">
	      <a href="<?php echo '/forum/showthread.php?tid='.$hvalue->tid; ?>" title="<?php echo $hvalue->subject; ?>" class="data-title-link">
	       <?php echo $hvalue->category; ?>
	      </a>
	     </td>
	     <td class="data-link" rowspan="2">
	      <a href="<?php echo '/forum/showthread.php?tid='.$hvalue->tid; ?>" title="<?php echo $hvalue->subject; ?>" class="details-link">więcej</a>
	     </td>	     
	    </tr>
	    <tr>
	     <td class="data-content">
	      <?php echo Sosweb_Util_Common_String::prepareStringFragment($hvalue->subject) ; ?>
	     </td>
	    </tr>	    
	   </table>
	  </td>
	 </tr>
<?php 
			$loopCounter++;
		endforeach; 
	endif;
?>     
    </table>
   </td>
   <td>
    &nbsp;
   </td>
   <td class="textBlockItem">
    <table class="fullW">
     <tr>
      <td class="popular-coupons-header">
	   <table class="fullW">
	    <tr>
	     <td class="hot-promo-header-icon">
	      <a class="submenu-link" href="<?php echo $this->baseUrl.'/Coupons'; ?>" title="Zobacz kupony rabatowe ProfitMania">
	       <img src="<?php echo $this->baseUrl.'/public/images/arrow_o2o.png'?>" alt="Popularne Kupony" width="31px" height="24px" />
	      </a>
	     </td>
	     <td class="hot-promo-header-text">
	      <a class="submenu-link" href="<?php echo $this->baseUrl.'/Coupons'; ?>" title="Zobacz kupony rabatowe ProfitMania">
	       <h1 class="promo-header">Gorące Kupony</h1>
	      </a>
	     </td>
	    </tr>
	   </table>       
      </td>
     </tr>
<?php 
	if (count($this->newest_coupons) == 0) :
?>
	 <tr>
	  <td class="data-cell-light">
	   Brak kuponów
	  </td>
	 </tr>	
<?php 
	else :
		$loopCounter = 0;
		foreach ($this->newest_coupons as $nkey=>$nvalue) : ?>
	 <tr>
	  <td class="<?php echo ($loopCounter%2 == 0 ? 'data-cell-light' : 'data-cell-dark'); ?>">
	   <table class="fullW">
	    <tr>
	     <td class="data-title">
	      <a href="<?php echo $this->baseUrl.'/Coupons/index/id/'.$nvalue->id; ?>" title="<?php echo $nvalue->content; ?>" class="data-title-link">
	       <?php echo $nvalue->title; ?>
	      </a>
	     </td>
	     <td class="data-link" rowspan="2">
	      <a href="<?php echo $this->baseUrl.'/Coupons/index/id/'.$nvalue->id; ?>" title="<?php echo $nvalue->content; ?>" class="details-link">
	       więcej
	      </a>
	     </td>	     
	    </tr>
	    <tr>
	     <td class="data-content">
	      <?php echo Sosweb_Util_Common_String::prepareStringFragment($nvalue->content) ; ?>
	     </td>
	    </tr>	    
	   </table>
	  </td>
	 </tr>
<?php 
			$loopCounter++;
		endforeach; 
	endif;
?>     
    </table>   
   </td>
  </tr>
 </table>
</div>